package com.fzh.web.yibai.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fzh.web.yibai.app.entity.Category;
import com.fzh.web.yibai.app.mapper.CategoryMapper;
import com.fzh.web.yibai.app.service.CategoryService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fang
 * @since 2021-04-19
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {

    @Override
    public List<Category> findCategory(Integer webSiteId) {
        QueryWrapper<Category> queryWrapper= new QueryWrapper<>();
        queryWrapper.eq("site_id",webSiteId);
        queryWrapper.eq("status","T");
        queryWrapper.orderByAsc("sort_no");
        return baseMapper.selectList(queryWrapper);
    }
}
